home *** CD-ROM | disk | FTP | other *** search
/ Champak 49 / Volume 49 - JOGO DISK .iso / Games / freezelifter.swf / scripts / DefineSprite_234 / frame_2 / DoAction.as
Encoding:
Text File  |  2007-10-01  |  1.0 KB  |  41 lines

  1. if(_root.crashed ne "yes")
  2. {
  3.    var xs = _root.chopper.chopper_speed_x / 2.3 + _root.background_speed;
  4.    if(_root.chopper.chopper_speed_x > 0)
  5.    {
  6.       if(_root.base._x > - _root.background_limit)
  7.       {
  8.          _root.left = "no";
  9.          _X = _X - xs;
  10.          _root.weather._x -= xs;
  11.          setProperty("_root.base", _X, _X * 1.5);
  12.       }
  13.       else
  14.       {
  15.          _root.right = "yes";
  16.       }
  17.    }
  18.    else if(_root.base._x < 0)
  19.    {
  20.       _root.right = "no";
  21.       _X = _X - xs;
  22.       _root.weather._x -= xs;
  23.       setProperty("_root.base", _X, _X * 1.5);
  24.    }
  25.    else
  26.    {
  27.       _root.left = "yes";
  28.    }
  29.    if(getProperty("_root.base", _X) > 0)
  30.    {
  31.       setProperty("_root.base", _X, 0);
  32.    }
  33.    setProperty("_root.console.map.map", _X, (- _X) * 0.2);
  34.    var x = _root.chopper._x - 20;
  35.    var mx = 66 * (x / 500);
  36.    var y = _root.chopper._y - 96;
  37.    var my = 72 * (y / 466);
  38.    setProperty("_root.console.map.map.chop", _X, mx);
  39.    setProperty("_root.console.map.map.chop", _Y, my);
  40. }
  41.